.class public Lcom/waiqin365/lightapp/kehu/b/bu;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Ljava/util/List;

.field private c:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 0

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-object p1, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->a:Landroid/content/Context;

    iput-object p2, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->b:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->c:Ljava/lang/String;

    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/bw;

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/bw;->b:Ljava/lang/String;

    iget-object v2, v0, Lcom/waiqin365/lightapp/kehu/b/bw;->c:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_0

    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/b/bw;->b:Ljava/lang/String;

    move-object v3, v1

    :goto_0
    if-nez p2, :cond_1

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->a:Landroid/content/Context;

    invoke-static {v1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    const v2, 0x7f030075

    const/4 v4, 0x0

    invoke-virtual {v1, v2, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    new-instance v2, Lcom/waiqin365/lightapp/kehu/b/bv;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/kehu/b/bv;-><init>(Lcom/waiqin365/lightapp/kehu/b/bu;)V

    invoke-virtual {p2, v2}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    const v1, 0x7f0c01ef

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, v2, Lcom/waiqin365/lightapp/kehu/b/bv;->a:Landroid/widget/TextView;

    const v1, 0x7f0c0215

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, v2, Lcom/waiqin365/lightapp/kehu/b/bv;->b:Landroid/widget/TextView;

    const v1, 0x7f0c0214

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, v2, Lcom/waiqin365/lightapp/kehu/b/bv;->c:Landroid/widget/ImageView;

    move-object v1, v2

    :goto_1
    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->c:Ljava/lang/String;

    if-eqz v2, :cond_2

    const-string/jumbo v2, ""

    iget-object v4, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->c:Ljava/lang/String;

    invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_2

    iget-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/bv;->a:Landroid/widget/TextView;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/b/bw;->a:Ljava/lang/String;

    iget-object v4, p0, Lcom/waiqin365/lightapp/kehu/b/bu;->c:Ljava/lang/String;

    const-string/jumbo v5, "#ff9008"

    invoke-static {v5}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v5

    invoke-static {v0, v4, v5}, Lcom/waiqin365/lightapp/dailyreport/util/a;->a(Ljava/lang/CharSequence;Ljava/lang/CharSequence;I)Landroid/text/SpannableStringBuilder;

    move-result-object v0

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_2
    iget-object v0, v1, Lcom/waiqin365/lightapp/kehu/b/bv;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-object p2

    :cond_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, v0, Lcom/waiqin365/lightapp/kehu/b/bw;->c:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, v0, Lcom/waiqin365/lightapp/kehu/b/bw;->b:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    move-object v3, v1

    goto :goto_0

    :cond_1
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/lightapp/kehu/b/bv;

    goto :goto_1

    :cond_2
    iget-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/bv;->a:Landroid/widget/TextView;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/b/bw;->a:Ljava/lang/String;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_2
.end method
